#ifdef HAVE_CONFIG_H
#include "config.h"
#endif

#include <iostream>

#include "cmdline.h"
#include "Reader.hh"

void printWelcome();
void printCommandHelp();

int
main(int argc, char ** argv)
{

  gengetopt_args_info args_info;
  
  if(cmdline_parser(argc, argv, &args_info) != 0) {
    exit(1);
  }
  
  printWelcome();

  reader::Reader appReader;
  while(true) {
    std::string lineRead;
    lineRead = appReader.getLine();
    if(lineRead == "quit") {
      break;
    }
    else if(lineRead == "help") {
      printCommandHelp();
    }
  }

  return 0;
}

void
printWelcome()
{
  std::cout << "Welcome to the Lagniappe Execution Environment ("
	    << PACKAGE << " v" << VERSION << ")" << std::endl;
  std::cout << "Copyright (C) 2005 Taylor L. Riché <riche@cs.utexas.edu>" << std::endl;
  std::cout << std::endl;
  std::cout << "Enter \"help\" for assistance." << std::endl;
  return;
}

void
printCommandHelp() 
{
  return;
}
